23 research outputs found

    A Foundation for Embedded Languages

    Get PDF
    Recent work on embedding object languages into Haskell use ``phantom types'' (i.e., parameterized types whose parameter does not occur on the right-hand side of the type definition) to ensure that the embedded object-language terms are simply typed. But is it a safe assumption that only simply-typed terms can be represented in Haskell using phantom types? And conversely, can all simply-typed terms be represented in Haskell under the restrictions imposed by phantom types? In this article we investigate the conditions under which these assumptions are true: We show that these questions can be answered affirmatively for an idealized Haskell-like language and discuss to which extent Haskell can be used as a meta-language

    A Simple Take on Typed Abstract Syntax in Haskell-like Languages

    Get PDF
    We present a simple way to program typed abstract syntax in a language following a Hindley-Milner typing discipline, such as Haskell and ML, and we apply it to automate two proofs about normalization functions as embodied in type-directed partial evaluation for the simply typed lambda calculus: normalization functions (1) preserve types and (2) yield long beta-eta normal forms.Keywords: Type-directed partial evaluation, normalization functions, simply-typed lambda-calculus, higher-order abstract syntax, Haskell

    Type-safe pattern combinators

    Get PDF

    Compiling Actions by Partial Evaluation, Revisited

    Get PDF
    We revisit Bondorf and Palsberg's compilation of actions using< the offline syntax-directed partial evaluator Similix (FPCA'93, JFP'96), and we compare it in detail with using an online type-directed partial evaluator. In contrast to Similix, our type-directed partial evaluator is idempotent and requires no "binding-time improvements." It also appears to consume about 7 times less space and to be about 28 times faster than Similix, and to yield residual programs that are perceptibly more efficient than those generated by Similix

    Normalization by Evaluation with Typed Abstract Syntax

    Get PDF
    We present a simple way to implement typed abstract syntax for thelambda calculus in Haskell, using phantom types, and we specify normalization by evaluation (i.e., type-directed partial evaluation) to yield thistyped abstract syntax. Proving that normalization by evaluation preserves types and yields normal forms then reduces to type-checking thespecification

    ENTRA:Whole-systems energy transparency

    Get PDF
    Promoting energy efficiency to a first class system design goal is an important research challenge. Although more energy-efficient hardware can be designed, it is software that controls the hardware; for a given system the potential for energy savings is likely to be much greater at the higher levels of abstraction in the system stack. Thus the greatest savings are expected from energy-aware software development, which is the vision of the EU ENTRA project. This article presents the concept of energy transparency as a foundation for energy-aware software development. We show how energy modelling of hardware is combined with static analysis to allow the programmer to understand the energy consumption of a program without executing it, thus enabling exploration of the design space taking energy into consideration. The paper concludes by summarising the current and future challenges identified in the ENTRA project.Comment: Revised preprint submitted to MICPRO on 27 May 2016, 23 pages, 3 figure

    Higher-Order Program Generation

    No full text
    This dissertation addresses the challenges of embedding programming languages, specializing generic programs to specific parameters, and generating specialized instances of programs directly as executable code. Our main tools are higher-order programming techniques and automatic program generation. It is our thesis that they synergize well in the development of customizable software. Recen

    This document in subdirectoryRS/02/34/ A Foundation for Embedded Languages

    No full text
    Reproduction of all or part of this work is permitted for educational or research use on condition that this copyright notice is included in any copy. See back inner page for a list of recent BRICS Report Series publications. Copies may be obtained by contacting: BRIC

    Acknowledgments

    No full text
    Abstract: This thesis describes some interplays between the specification and the implementation of higher-order programming languages. We first investigate a traditional implementation of Scheme (compiler, run-time machine). We then turn to Action Semantics. And finally we cross-fertilize these two approaches using both syntax-directed and type-directed partial evaluation and introducing an alternative representation of data structures

    First-Class Open and CLosed Code Fragments

    No full text
    corecore